//
//  ReadCorpusCollectionViewCell.m
//  项目
//
//  Created by 关雷 on 15-1-3.
//  Copyright (c) 2015年 张诗雨. All rights reserved.
//

#import "ReadCorpusCollectionViewCell.h"
#import "WebColor.h"
@implementation ReadCorpusCollectionViewCell
- (void)dealloc
{
    [_igmV release];
    [_upLable release];
    [_downLable release];
    [_downLableName release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.igmV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width - 5, frame.size.height / 4 * 3)];
        _igmV.userInteractionEnabled = YES;
        _igmV.layer.cornerRadius = 5;
        _igmV.layer.masksToBounds = YES;
        _igmV.layer.shadowColor = [[UIColor grayColor] CGColor];
        _igmV.layer.shadowOffset = CGSizeMake(5, 2);
        
        _igmV.layer.shadowOpacity = 1;
        [self.contentView addSubview:_igmV];
        [_igmV release];
        self.upLable = [[UILabel alloc] initWithFrame:CGRectMake(0, frame.size.height / 4 * 3 + 10, 60, 20)];
        [_upLable setBackgroundColor:[WebColor lightGreen]];
//        _upLable.layer.cornerRadius = 5;
//        _upLable.layer.masksToBounds = YES;
        [_downLable setFont:[UIFont systemFontOfSize:12.0f]];
        [self.contentView addSubview:_upLable];
        [_upLable release];
        self.downLable = [[UILabel alloc] initWithFrame:CGRectMake(0, frame.size.height / 4 * 3 + 35, 30, 30)];
        self.downLable.textColor = [WebColor slateGray];
        [_downLable setFont:[UIFont systemFontOfSize:15.0f]];
        _downLable.text = @"by:";
        [self.contentView addSubview:_downLable];
        [_downLable release];
        self.downLableName = [[UILabel alloc] initWithFrame:CGRectMake(30, frame.size.height / 4 * 3 + 35, 150, 30)];
        [_downLableName setFont:[UIFont systemFontOfSize:15.0f]];
        [_downLableName setTextColor:[WebColor violet]];
        [self.contentView addSubview:_downLableName];
        [_downLableName release];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
//    self.igmV.frame = CGRectMake(0, 0, self.frame.size.width - 5, self.frame.size.height / 4 * 3);
    _igmV.layer.shadowColor = [[UIColor redColor] CGColor];
    _igmV.layer.shadowOffset = CGSizeMake(5, 15);
    _igmV.layer.shadowOpacity = 1;
}
@end
